package com.lab.es.demo.controller;

import com.lab.es.demo.message.SendMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AopIndexController {
    @Autowired
    private SendMessage sendMessage;

    @GetMapping("/sendItemMessage")
    public String send() {
        try {
            //sendMessage.sendItem(new Item().setId("56789").setItemName("华为Mate 5000").setItemPrice(BigDecimal.valueOf(6600)));
        } catch (Exception e) {
            return e.getMessage();
        }

        return "ok";
    }
}
